﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of ArticleForm(article,user)">
	
	<Sql>
    SELECT        ArticleFormUserResponses.id, ArticleFormUserResponses.lastUpdated, ArticleFormUserResponses.formData, Articles.id AS article_id,
    Articles.baseTitle AS article_baseTitle, Articles.translatedTitles AS atricle_translatedTitles, Users.id AS user_id, Users.userName AS user_userName
    FROM            ArticleFormUserResponses INNER JOIN
    Articles ON ArticleFormUserResponses.articleId = Articles.id INNER JOIN
    Users ON ArticleFormUserResponses.userId = Users.id
    WHERE        (Articles.companyId = @companyId)
    order by ArticleFormUserResponses.lastUpdated DESC
  </Sql>
	<Param name="companyId" type="UniqueIdentifier" />
</AdoNetDataAccess>
